package com.engineering.elink.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.engineering.elink.common.ErrorType;
import com.engineering.elink.service.VideoCategoryService;
import com.engineering.elink.util.ResJsonUtil;

@RestController
@CrossOrigin
@RequestMapping("/api/skillcategory")
@Api(value="工程技能分类接口")
public class SkillCategoryController {
	@Autowired
	private VideoCategoryService videoCategoryService;

	/**
	 * 获取工程技能一级分类
	 */
	@RequestMapping(value = "/getTopCategory", method = RequestMethod.GET)
	@ApiOperation(value = "获取工程技能一级分类")
	public Map<String, Object> getTopCategory() {
		return ResJsonUtil.getMap(ErrorType.SUCCESS,videoCategoryService.getSkillTopCategory());
	}
	
}
